package com.example.demo.service;

import com.example.demo.mapper.ClassesMapper;
import com.example.demo.pojo.Classes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassesServiceImpl implements ClassesService{

    @Autowired
    ClassesMapper classesMapper;

    @Override
    public List<Classes> queryAllClass() {
       return classesMapper.queryAllClass();
    }

    @Override
    public Classes queryone(int id) {
        return classesMapper.queryone(id);
    }

    @Override
    public void addClass(String class_name, String grade, String classs) {
       classesMapper.addClass(class_name,grade,classs);
    }

    @Override
    public void updateClass(Classes classes) {
        classesMapper.updateClass(classes);
    }

    @Override
    public void deleteClass(int id) {

            classesMapper.deleteClass(id);

    }
}
